#ifndef ELECTRONICSCALEDATAPROCESSPAGE_H
#define ELECTRONICSCALEDATAPROCESSPAGE_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QGroupBox>
#include "curve.h"
#include "moduleelectronicscaledefine.h"
#include "electronicscalehorndiagram.h"

class ElectronicScaleDataProcessPage : public QWidget
{
    Q_OBJECT
public:
    explicit ElectronicScaleDataProcessPage(QWidget *parent = nullptr);
    ~ElectronicScaleDataProcessPage();

signals:

private:
    Curve           *m_curve;
    Curve           *m_curveHornDiagram;

    QPushButton     *m_pbImportWeight;
    QString         m_importWeightPath;

    // 上升曲线
    QGroupBox       *m_gbRaiseCurve;
    QLabel          *m_lbInterval;
    QLineEdit       *m_leInterval;
    QPushButton     *m_pbCalculateIntervalRate;
    QPushButton     *m_pbExportIntervalRate;

    // 喇叭图
    QGroupBox       *m_gbHornDiagramCurve;
    QLabel          *m_lbWhichHour;
    QLineEdit       *m_leWhichHour;
    QLabel          *m_lbTargetRate;
    QLineEdit       *m_leTargetRate;
    QLabel          *m_lbDensity;
    QLineEdit       *m_leDensity;
    QLabel          *m_lbPeriod;
    QLineEdit       *m_lePeriod;
    QLabel          *m_lbSampleInterval;
    QLineEdit       *m_leSampleInterval;
    QPushButton     *m_pbCalculateHornDiagram;
    QPushButton     *m_pbExportHornDiagram;

    // 数据
    QList<electronicscale::Sample>          m_samples;
    QList<electronicscale::IntervalRate>    m_rates;

    // 喇叭图
    ElectronicScaleHornDiagram              *m_hornDiagram = nullptr;
};

#endif // ELECTRONICSCALEDATAPROCESSPAGE_H
